#include<stdio.h>
int main() 
{
	int n = 0, i = 0, a = 1,sum=0,d=1;
scanf_s("%d", &i); 
for (d = 1; d < 3; d++)
{
	for (n = 1; n <= i; n++)
	{
		a *= n;
	}
	sum += a;
}
printf("%d", sum);
return 0;
}